local mapper  = require "shared.object.mapper"

local ScalarMapper = mapper.ScalarMapper
local ObjectMapper = mapper.ObjectMapper
local ListMapper   = mapper.ListMapper

local _M = {}
do
  _M.WALLET_SERVICE = {
    ['/Player/Balance'] = {
      PEEK = {
        response = {
          balance    = "balance",
          currency   = "currency",
          _timestamp = "_timestamp",
        }
      },
    },
    ['/Player/Transfer'] = {
      LIST = {
        response = {
          transfers = ListMapper("transfers",
          {
            transferId           = "transferId",
            provider             = "provider",
            player               = "player",
            wallet               = "wallet",
            currency             = "currency",
            amount               = "amount",
            balance              = "balance",
            status               = "status",
            casino               = "casino",
            casinoTransactionId  = "casinoTransactionId",
            dealer               = "dealer",
            dealerPlayer         = "dealerPlayer",
            operationUrn         = "operationUrn",
            commitAt             = "commitAt",
          }),
          _timestamp = "_timestamp",
        }
      },
      COMMIT = {
        response = {
          transferId = "transferId",
          amount     = "amount",
          balance    = "balance",
          _timestamp = "_timestamp",
        }
      },
    },
    ['/Player/Wallet'] = {
      LIST = {
        response = {
          wallets = ListMapper("wallets", {
            wallet   = "wallet",
            currency = "currency",
            balance  = "balance",
            status   = "status",
          }),
          _timestamp = "_timestamp",
        }
      },
      PEEK = {
        response = {
          asset               = "asset",
          non_expendable      = "nonExpendable",
          balance             = "balance",
          currency            = "currency",
          status              = "status",
          lastTransactionId   = "lastTransactionId",
          lastTransactionDate = "lastTransactionDate",
          _idempotence        = "_idempotence",
          _timestamp          = "_timestamp",
        }
      },
    },

    ['/Fish/Bet'] = {
      PEEK = {
        response = {
          ticketId        = "ticketId",
          provider        = "provider",
          casino          = "casino",
          player          = "player",
          session         = "session",
          game            = "game",
          room            = "room",
          round           = "round",
          roundType       = "roundType",
          wallet          = "wallet",
          currency        = "currency",
          wager           = "wager",
          winlost         = "winlost",
          timezone        = "timezone",
          balance         = "betTransactionBalance",
          issueAt         = "betTransactionAt",
          settleId        = "settleTransactionId",
          settleAt        = "settleTransactionAt",
          cancelId        = "cancelTransactionId",
          cancelAt        = "cancelTransactionAt",
          status          = "status",
          winType         = "winType",
          accountType     = "accountType",
          account         = "account",
          playerDevice    = "playerDevice",
          playerOs        = "playerOs",
          playerIp        = "playerIp",
          dealer          = "dealer",
          dealerPlayer    = "dealerPlayer",
          parentRound     = "parentRound",
          bonusRoundTypes = "bonusRoundTypes",
          _timestamp      = "_timestamp",
        }
      },
      PLACE  = {
        response = {
          transactionId = "receiptId",
          balance       = "balance",
          _timestamp    = "_timestamp",
        }
      },
      SETTLE = {
        response  = {
          transactionId = "receiptId",
          balance       = "balance",
          _timestamp    = "_timestamp",
        }
      },
      CANCEL = {
        response = {
          transactionId = "receiptId",
          balance       = "balance",
          refundAmount  = "amount",
          _timestamp    = "_timestamp",
        }
      },
    },
    ['/Fish/Bonus'] = {
      SETTLE = {
        response  = {
          ticketId      = "ticketId",
          transactionId = "receiptId",
          balance       = "balance",
          _timestamp    = "_timestamp",
        }
      },
    },
    ['/Fish/Game'] = {
      START = {
        response = {
          _timestamp  = "_timestamp",
        }
      },
      STOP = {
        response = {
          _timestamp = "_timestamp",
        }
      },
    },
    ['/Fish/Stage'] = {
      STOP = {
        response = {
          _timestamp = "_timestamp",
        }
      },
    },
  }
end
return _M